<div class="modal-header" id="scope">
	<h3 class="modal-title">同步班次线路</h3>
</div>
<div class="modal-body">
	<form name="myForm" class="form-horizontal form-validation">
		<div class="panel panel-default">
			<div class="panel-body">
				<p class="m-l-xs" ng-if="param.type=='update'">说明：线路已变更，请勾选影响的班次进行同步修改，已售票班次无法同步。不勾选则只更新班次档案，不影响已经生成的班次计划。</p>
				<p class="m-l-xs" ng-if="param.type!='update'">说明：无法同步的班次列表如下。</p>
				<div class="table-responsive">
					<table class="table table-striped b-t b-light">
						<thead class="fixedThead">
							<tr>
								<th style="width: 10px;" ng-if="param.type!='update'"></th>
								<th style="width: 10px;" ng-if="param.type=='update'">
									<label class="i-checks m-b-none">
										<input type="checkbox" ng-model="ckAll" ng-click="checkAll(ckAll,list)"><i></i>
									</label>
								</th>
								<th>班次号</th>
								<th>状态</th>
								<th>发班日期</th>
								<th>发班时间</th>
								<th>已售/总票</th>
								<th>汽车票关联</th>
							</tr>
						</thead>
						<tbody class="scrollTbody">
							<tr ng-repeat="shift in list">
								<td style="width: 10px;" ng-if="param.type!='update'"></td>
								<td style="width: 10px;">
									<label class="i-checks m-b-none" ng-if="param.type=='update'">
										<input id="{{shift.ic}}" name="checks" type="checkbox" ng-checked="ckAll" ng-model="checks" ng-click="check(shift.id,checks)"
										 value="{{shift.id}}"><i></i>
									</label>
								</td>
								<td>{{shift.shiftNo}}</td>
								<td>{{shift.status | busShiftFilter}}</td>
								<td>{{shift.departDate| date : 'yyyy-MM-dd'}}</td>
								<td>{{shift.departTime| date : 'HH:mm:ss'}}</td>
								<td>{{shift.ticketSold}}/{{shift.tickets}}
								</td>
								<td>
									<span ng-if="shift.shiftAttachedId!=0">已关联</span>
									<span ng-if="shift.shiftAttachedId==0">未关联</span>
								</td>
							</tr>
						</tbody>
					</table>
				</div>
			</div>
			<footer class="panel-footer text-right bg-light lter" ng-if="param.type=='update'">
				<button class="btn btn-default" type="button" ng-click="cancel()">取消</button>
				<button type="submit" class="btn btn-success" ng-click="ok()">提交</button>
			</footer>
			<footer class="panel-footer text-right bg-light lter" ng-if="param.type!='update'">
				<button class="btn btn-default" type="button" ng-click="cancel()">关闭</button>
			</footer>
		</div>
	</form>
</div>
<style>
	.table {
		width: 100%;
		border-collapse: collapse;
		border-spacing: 0;
	}

	.fixedThead {
		display: block;
		width: 100%;
	}

	.scrollTbody {
		display: block;
		height: 262px;
		overflow: auto;
		width: 100%;
	}

	.table td,
	.table th {
		width: 200px;
		border-bottom: none;
		border-left: none;
		padding: 2px 3px 3px 4px
	}
</style>